<template>
	<div class="port-page">
		<!--<div class="but2">
        <router-link to="/home">
         	<el-button type="warning" size="small" class="add btn" style='margin-right: 10px;' icon="el-icon-menu">首页</el-button>
        </router-link>
        </div>-->
		<el-tabs type="border-card">
        <el-tab-pane label="采购入库审核">
        	<!-- 顶部按钮 -->
        <div class="but1">
        <router-link to="/home">
         	<el-button type="warning" size="small" class="add btn" style='margin-right: 5px;' icon="el-icon-menu">首页</el-button>
        </router-link>
        <el-button type="danger" size="small" v-if="visqy=='N'"  :disabled="multipleDeleteDisabled"  @click="plsh">批量审核</el-button>
        
        </div>
        <!-- 模糊搜索条件 -->
        <div class="search">
        	<el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss" @click='gd'>更多</el-button>
            <el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss1" @click='gd1'>更多</el-button>
        	<div class="search-item">
            <el-tooltip  placement="top" class="sx">
      				<el-switch  @change="search()" v-model="visqy" active-color="#13ce66" inactive-color="#ff4949" inactive-text="待审" active-text="已审" active-value="Y" inactive-value="N"></el-switch>
      			</el-tooltip>
     			</div>
              <div class="search-item">
                <el-input placeholder="按物品名称检索" class="code-search" v-model="vkeyword"  @keyup.enter.native="search" icon="search"></el-input>
            </div>
            <el-button type="primary" class="add btn" size="small" style="border-radius:13px;" :loading="searchLoading" @click="search()" icon="el-icon-search"></el-button>
        </div>
        
        <div class="search1" v-if='aa'>
            <span>入库时间</span>
        	<div class="search-item">
                <el-date-picker  v-model="vbtime"  :editable="false" type="date" class="code-search"  placeholder="开始日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
            <div class="search-item">
                  <el-date-picker  v-model="vetime" :editable="false"  type="date" class="code-search"  placeholder="结束日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
        </div>
        <!-- 数据表格展示区域 -->
        <el-table
            :data="cgrkdataList"
            border
            stripe
            size="small"
            align="left"
            class="admin-table"
            @select="checkSelect"
            @select-all="checkall">
            <el-table-column type="selection" width="35"></el-table-column>
            <el-table-column label="物品名称" width="100" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D;text-decoration:underline;background: #BEDBDF;" @click="componentsShow('wpxq',scope)">{{scope.row.wpmc}}</el-button>
				</template>
			</el-table-column>
            <div slot='empty'>
                <img src="../../../assets/img/empty.png" style="width:40px;vertical-align: middle;">
                <span style="vertical-align: middle;">暂时还没有内容哦!</span>
            </div>
            <el-table-column
                :prop="v.prop"
                :label="v.label"
                v-for="(v,index) in cgrkportTitleList"
                align="center"
                show-overflow-tooltip
                v-if="v.hide != 0"
                :formatter="v.formatter"
                :align="v.align || 'center'"
                :fixed="v.fixed"
                :class-name="v.columnStyle"
                :width="v.width"
                :min-width="v.minWidth"
                :header-align="v.headerAlign || 'center'"
                >
                <template scope="scope">
                    <div slot="reference" :style="tableCellControl(scope)">
                        {{ scope.row[scope.column.property] }}
                    </div>
                 </template>
            </el-table-column>
            <el-table-column label="不通过原因" v-if="visqy=='Y'" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D">{{scope.row.btgyy}}</el-button>
				</template>
			</el-table-column>
<!--v-if="yc"-->

            <el-table-column  align="center"    label="操作"  width="170px">
              <template scope="scope">
                  <el-button size="mini" type="success" v-if="scope.row.button.substring(1,2) =='Y'" @click="componentsShow('cgrktg',scope)">通过</el-button>
                  <el-button size="mini" v-if="visqy=='Y'"  type="success" @click="componentsShow('cgrkinfo',scope)" >详情</el-button>
                  <el-dropdown>
	                     <el-button type="primary" v-if="visqy=='N'" size="mini"> 更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
						 <el-dropdown-menu slot="dropdown">
						    <el-dropdown-item><el-button size="mini"  type="danger" v-if="scope.row.button.substring(2,3) =='Y'" @click="componentsShow('cgrkbtg',scope)">不通过</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="success" @click="componentsShow('cgrkinfo',scope)" >详情</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="primary"  @click="componentsShow('wpxq',scope)">物品详情</el-button></el-dropdown-item>
						 </el-dropdown-menu>
					 </el-dropdown>
                  
              </template>
            </el-table-column>
        </el-table>
        <!-- 分页查询区域 -->
        <el-pagination
            @size-change="cgrkhandleSizeChange"
            @current-change="cgrkhandleCurrentChange"
            :current-page.sync="pageindex1"
            :page-sizes="pagesizes1"
            :page-size="pagesize1"
            :layout="layout"
            :total="total1"
            class="class-page">
        </el-pagination>
        <!-- 各个组件显示区域 -->
        <LoadingComponent v-show="isLoading"></LoadingComponent>
        <CgrkinfoComponent v-if="portComponents.cgrkinfo.toggle" @close="componentsHide" :params="portComponents.cgrkinfo.params"></CgrkinfoComponent>
        <CgrkbtgComponent v-if="portComponents.cgrkbtg.toggle" @close="componentsHide" :params="portComponents.cgrkbtg.params"></CgrkbtgComponent>
        <CgrktgComponent v-if="portComponents.cgrktg.toggle" @close="componentsHide" :params="portComponents.cgrktg.params"></CgrktgComponent>
        <WpxqComponent v-if="portComponents.wpxq.toggle" @close="componentsHide" :params="portComponents.wpxq.params"></WpxqComponent>
        	
        <!-- 子路由显示区域 -->
        <router-view class="port-view"></router-view>
  	    
	    </el-tab-pane>
	    
	    
	    
	    
	    <el-tab-pane label="采购退货审核">
	    	<!-- 顶部按钮 -->
	    	<div class="but1">
        <router-link to="/home">
         	<el-button type="warning" size="small" class="add btn" style='margin-right: 5px;' icon="el-icon-menu">首页</el-button>
        </router-link>
        <el-button type="danger" size="small" v-if="visqy=='N'"  :disabled="multipleDeleteDisabled"  @click="cgthplsh">批量审核</el-button>
        </div>
              <!-- 模糊搜索条件 -->
        <div class="search">
        	<el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss" @click='gd'>更多</el-button>
            <el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss1" @click='gd1'>更多</el-button>
          <div class="search-item">
            <el-tooltip  placement="top" class="sx"  >
              <el-switch  @change="search()" v-model="visqy" active-color="#13ce66" inactive-color="#ff4949" inactive-text="待审" active-text="已审" active-value="Y" inactive-value="N"></el-switch>
            </el-tooltip>
          </div>
            <div class="search-item">
                <el-input placeholder="请输入物品名称" class="code-search" v-model="vkeyword"  @keyup.enter.native="search" icon="search"></el-input>
            </div>
            <el-button type="primary" class="add btn" size="small" style="border-radius:13px;" :loading="searchLoading" @click="search" icon="el-icon-search"></el-button>
        </div>
        
        <div class="search1" v-if='aa'>
            <span>退货时间</span>
        	<div class="search-item">
                <el-date-picker  v-model="vbtime"  :editable="false" type="date" class="code-search"  placeholder="开始日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
            <div class="search-item">
                  <el-date-picker  v-model="vetime" :editable="false"  type="date" class="code-search"  placeholder="结束日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
        </div>
        <!-- 数据表格展示区域 -->
        <el-table
            :data="cgthdataList"
            border
            stripe
            size="small"
            align="left"
            class="admin-table"
            @select="checkSelect"
            @select-all="checkall">
            <el-table-column type="selection" width="35"></el-table-column>
            <el-table-column label="物品名称" width="100" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D;text-decoration:underline;background: #BEDBDF;" @click="componentsShow('wpxq',scope)">{{scope.row.wpmc}}</el-button>
				</template>
			</el-table-column>
           <div slot='empty'>
                <img src="../../../assets/img/empty.png" style="width:40px;vertical-align: middle;">
                <span style="vertical-align: middle;">暂时还没有内容哦!</span>
            </div>
            <el-table-column
                :prop="v.prop"
                :label="v.label"
                v-for="(v,index) in cgthportTitleList"
                align="center"
                show-overflow-tooltip
                v-if="v.hide != 0"
                :formatter="v.formatter"
                :align="v.align || 'center'"
                :fixed="v.fixed"
                :class-name="v.columnStyle"
                :width="v.width"
                :min-width="v.minWidth"
                :header-align="v.headerAlign || 'center'"
                >
                <template scope="scope">
                    <div slot="reference" :style="tableCellControl(scope)">
                        {{ scope.row[scope.column.property] }}
                    </div>
                 </template>
            </el-table-column>
            <el-table-column label="不通过原因" v-if="visqy=='Y'" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D">{{scope.row.btgyy}}</el-button>
				</template>
			</el-table-column>
			<!--v-if="yc"-->
           <el-table-column   align="center"     label="操作"  width="170px">
                <template scope="scope">
                  <el-button size="mini" type="success" v-if="scope.row.opbtn.substring(3,4) == 'Y' "  @click="componentsShow('cgthtg',scope)">通过</el-button>
                  <el-button size="mini" v-if="visqy=='Y'"  type="success" @click="componentsShow('cgthinfo',scope)" >详情</el-button>
                  <el-dropdown>
	                     <el-button type="primary" v-if="visqy=='N'" size="mini"> 更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
						 <el-dropdown-menu slot="dropdown">
						    <el-dropdown-item><el-button size="mini" type="danger" v-if="scope.row.opbtn.substring(4,5) == 'Y' "   @click="componentsShow('cgthbtg',scope)">不通过</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="success" @click="componentsShow('cgthinfo',scope)">详情</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="primary"  @click="componentsShow('wpxq',scope)">物品详情</el-button></el-dropdown-item>
						 </el-dropdown-menu>
					 </el-dropdown>
                  <!--<el-button size="mini" type="warning" v-if="scope.row.opbtn.substring(4,5) == 'Y' "   @click="componentsShow('cgthbtg',scope)">不通过</el-button>-->
                </template>
            </el-table-column>
        </el-table>
        <!-- 分页查询区域 -->
        <el-pagination
            @size-change="cgthhandleSizeChange"
            @current-change="cgthhandleCurrentChange"
            :current-page.sync="pageindex2"
            :page-sizes="pagesizes2"
            :page-size="pagesize2"
            :layout="layout"
            :total="total2"
            class="class-page">
        </el-pagination>
        <!-- 各个组件显示区域 -->
        <!-- 动画加载 -->
        <LoadingComponent v-show="isLoading"></LoadingComponent>
        <CgthinfoComponent v-if="portComponents.cgthinfo.toggle" @close="componentsHide" :params="portComponents.cgthinfo.params"></CgthinfoComponent>
        <CgthbtgComponent v-if="portComponents.cgthbtg.toggle" @close="componentsHide" :params="portComponents.cgthbtg.params"></CgthbtgComponent>
        <CgthtgComponent v-if="portComponents.cgthtg.toggle" @close="componentsHide" :params="portComponents.cgthtg.params"></CgthtgComponent>
        <WpxqComponent v-if="portComponents.wpxq.toggle" @close="componentsHide" :params="portComponents.wpxq.params"></WpxqComponent>
       <router-view class="port-view"></router-view>
	    </el-tab-pane>
	    
	    
	    
	    <el-tab-pane label="报损审核">
  	    <!-- 顶部按钮 -->
  	    <div class="but1">
        <router-link to="/home">
         	<el-button type="warning" size="small" class="add btn" style='margin-right: 5px;' icon="el-icon-menu">首页</el-button>
        </router-link>
        <el-button type="danger" size="small" v-if="visqy=='N'" :disabled="multipleDeleteDisabled"  @click="bsplsh">批量审核</el-button>
        </div>
		<!-- 模糊搜索条件 -->
		<div class="search">
	        <div class="search-item">
	        <el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss" @click='gd'>更多</el-button>
            <el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss1" @click='gd1'>更多</el-button>
            <el-tooltip  placement="top" class="sx"  >
  				<el-switch  @change="search()" v-model="visqy" active-color="#13ce66" inactive-color="#ff4949" inactive-text="待审" active-text="已审" active-value="Y" inactive-value="N"></el-switch>
  			</el-tooltip>
 			</div>
			<div class="search-item">
				<el-input placeholder="请输入物品名称" class="code-search" v-model="vkeyword" @keyup.enter.native="search" icon="search"></el-input>
			</div>
                <el-button type="primary" class="add btn" style="border-radius:13px;" :loading="searchLoading" @click="search" icon="el-icon-search"></el-button>
		</div>
		<div class="search1" v-if='aa'>
            <span>报损时间</span>
        	<div class="search-item">
                <el-date-picker  v-model="vbtime"  :editable="false" type="date" class="code-search"  placeholder="开始日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
            <div class="search-item">
                  <el-date-picker  v-model="vetime" :editable="false"  type="date" class="code-search"  placeholder="结束日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
        </div>
		<!-- 数据表格展示区域 -->
		<el-table 
			  :data="bsdataList" 
			  border
	          stripe
	          size="small"
	          align="left"
			  class="admin-table" 
			  @select="checkSelect" 
			  @select-all="checkall">
			<el-table-column type="selection" width="35"></el-table-column>
			<el-table-column label="物品名称" width="100" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D;text-decoration:underline;background: #BEDBDF;" @click="componentsShow('wpxq',scope)">{{scope.row.wpmc}}</el-button>
				</template>
			</el-table-column>
			<div slot='empty'>
				<img src="../../../assets/img/empty.png" style="width:40px;vertical-align: middle;">
				<span style="vertical-align: middle;">暂时还没有内容哦!</span>
			</div>
			<el-table-column :prop="v.prop" :label="v.label" v-for="(v,index) in bsportTitleList" align="center" show-overflow-tooltip v-if="v.hide != 0" :formatter="v.formatter" :align="v.align || 'center'" :fixed="v.fixed" :class-name="v.columnStyle" :width="v.width" :min-width="v.minWidth" :header-align="v.headerAlign || 'center'">
				<template scope="scope">
					<div slot="reference" :style="tableCellControl(scope)">
						{{ scope.row[scope.column.property] }}
					</div>
				</template>
			</el-table-column> 
			<el-table-column label="不通过原因" v-if="visqy=='Y'" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D">{{scope.row.btgyy}}</el-button>
				</template>
			</el-table-column>
			<!--v-if="yc"--> 
			<el-table-column  align="center"  label="操作" width="170px">
				<template scope="scope">
					<el-button size="mini" type="success" v-if="scope.row.opbtn.substring(3,4) =='Y'" @click="componentsShow('bstg',scope)">通过</el-button>
                    <el-button size="mini" v-if="visqy=='Y'"  type="success" @click="componentsShow('bsinfo',scope)">详情</el-button>
					<el-dropdown>
	                     <el-button type="primary" v-if="visqy=='N'" size="mini"> 更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
						 <el-dropdown-menu slot="dropdown">
						    <el-dropdown-item><el-button size="mini" type="danger" v-if="scope.row.opbtn.substring(4,5) =='Y'" @click="componentsShow('bsbtg',scope)">不通过</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="success" @click="componentsShow('bsinfo',scope)">详情</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="primary"  @click="componentsShow('wpxq',scope)">物品详情</el-button></el-dropdown-item>
						 </el-dropdown-menu>
					 </el-dropdown>
                    <!--<el-button size="mini" type="warning" v-if="scope.row.opbtn.substring(4,5) =='Y'" @click="componentsShow('bsbtg',scope)">不通过</el-button>-->
				</template>
			</el-table-column>
		</el-table>
		<!-- 分页查询区域 -->
		<el-pagination 
			@size-change="bshandleSizeChange" 
			@current-change="bshandleCurrentChange" 
			:current-page.sync="pageindex3" 
			:page-sizes="pagesizes3" 
			:page-size="pagesize3" 
			:layout="layout" 
			:total="total3" 
			class="class-page">
		</el-pagination>
		<!-- 各个组件显示区域 -->
		<!-- 动画加载 -->
		<LoadingComponent v-show="isLoading"></LoadingComponent>
        <BsinfoComponent v-if="portComponents.bsinfo.toggle" @close="componentsHide" :params="portComponents.bsinfo.params"></BsinfoComponent>
		<BsbtgComponent v-if="portComponents.bsbtg.toggle" @close="componentsHide" :params="portComponents.bsbtg.params"></BsbtgComponent>
        <BstgComponent  v-if="portComponents.bstg.toggle"  @close="componentsHide" :params="portComponents.bstg.params"></BstgComponent>
        <WpxqComponent v-if="portComponents.wpxq.toggle" @close="componentsHide" :params="portComponents.wpxq.params"></WpxqComponent>
		<!-- 子路由显示区域 -->
		<router-view class="port-view"></router-view>
  </el-tab-pane>
  
  
  <el-tab-pane label="盘点审核">
  	 <!-- 顶部按钮 -->
  	 <div class="but1">
        <router-link to="/home">
         	<el-button type="warning" size="small" class="add btn" style='margin-right: 10px;' icon="el-icon-menu">首页</el-button>
        </router-link>
        <el-button type="danger" size="small" v-if="visqy=='N'"  :disabled="multipleDeleteDisabled"  @click="pdplsh">批量审核</el-button>
        </div>
        <!-- 模糊搜索条件 -->
        <div class="search">
        	<el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss" @click='gd'>更多</el-button>
            <el-button type="text" size="small" class="add btn" style=' text-decoration:underline;' v-if="ss1" @click='gd1'>更多</el-button>
        	<div class="search-item">
            <el-tooltip  placement="top" class="sx"  >
  				<el-switch  @change="search()" v-model="visqy" active-color="#13ce66" inactive-color="#ff4949" inactive-text="待审" active-text="已审" active-value="Y" inactive-value="N"></el-switch>
  			</el-tooltip>
 			</div>

            <div class="search-item">
                <el-input placeholder="请输入物品名称" class="code-search" v-model="vkeyword"  @keyup.enter.native="search" icon="search"></el-input>
            </div>
            <el-button type="primary" size="small" class="add btn" style="border-radius:13px;" :loading="searchLoading" @click="search" icon="el-icon-search"></el-button>
        </div>
        <div class="search1" v-if='aa'>
            <span>盘点时间</span>
        	<div class="search-item">
                <el-date-picker  v-model="vbtime"  :editable="false" type="date" class="code-search"  placeholder="开始日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
            <div class="search-item">
                  <el-date-picker  v-model="vetime" :editable="false"  type="date" class="code-search"  placeholder="结束日期" @keyup.enter.native="search" icon="search"></el-date-picker>
            </div>
        </div>
        <!-- 数据表格展示区域 -->
        <el-table
            :data="pddataList"
              border
	          stripe
	          size="small"
	          align="left"
            class="admin-table"
            @select="checkSelect"
            @select-all="checkall">
            <el-table-column type="selection" width="35"></el-table-column>
            <el-table-column label="物品名称" width="100" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D;text-decoration:underline;background: #BEDBDF;" @click="componentsShow('wpxq',scope)">{{scope.row.wpmc}}</el-button>
				</template>
			</el-table-column>
            <div slot='empty'>
                <img src="../../../assets/img/empty.png" style="width:40px;vertical-align: middle;">
                <span style="vertical-align: middle;">您还没有添加要盘点的物品哟!</span>
            </div>
            <el-table-column
                :prop="v.prop"
                :label="v.label"
                v-for="(v,index) in pdportTitleList"
                align="center"
                show-overflow-tooltip
                v-if="v.hide != 0"
                :formatter="v.formatter"
                :align="v.align || 'center'"
                :fixed="v.fixed"
                :class-name="v.columnStyle"
                :width="v.width"
                :min-width="v.minWidth"
                :header-align="v.headerAlign || 'center'"
                >
                <template scope="scope">
                    <div slot="reference" :style="tableCellControl(scope)">
                        {{ scope.row[scope.column.property] }}
                    </div>
                 </template>
            </el-table-column>
            <el-table-column label="不通过原因" v-if="visqy=='Y'" align="center">
				<template scope="scope">
					<el-button size="small" type="text" style="color:#1F2D3D">{{scope.row.btgyy}}</el-button>
				</template>
			</el-table-column>
<!--v-if="yc"--> 
            <el-table-column   align="center"    label="操作"  width="170px">
              <template scope="scope">
                  <el-button size="mini"   v-if="scope.row.zt== '0'" type="success" @click="componentsShow('pdtg',scope)">通过</el-button>
                  <el-button size="mini" v-if="visqy=='Y'"  type="success" @click="componentsShow('pdinfo',scope)">详情</el-button>
                  <el-dropdown>
	                     <el-button type="primary" v-if="visqy=='N'" size="mini"> 更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
						 <el-dropdown-menu slot="dropdown">
						    <el-dropdown-item><el-button size="mini"   v-if="scope.row.zt== '0'" type="danger" @click="componentsShow('pdbtg',scope)">不通过</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="success" @click="componentsShow('pdinfo',scope)">详情</el-button></el-dropdown-item>
						    <el-dropdown-item><el-button size="mini"  type="primary"  @click="componentsShow('wpxq',scope)">物品详情</el-button></el-dropdown-item>
						 </el-dropdown-menu>
					 </el-dropdown>
                  <!--<el-button size="mini"   v-if="scope.row.zt== '0'" type="warning" @click="componentsShow('pdbtg',scope)">不通过</el-button>-->
              </template>
            </el-table-column>
        </el-table>
        <!-- 分页查询区域 -->
        <el-pagination
            @size-change="pdhandleSizeChange"
            @current-change="pdhandleCurrentChange"
            :current-page.sync="pageindex4"
            :page-sizes="pagesizes4"
            :page-size="pagesize4"
            :layout="layout"
            :total="total4"
            class="class-page">
        </el-pagination>
        <!-- 各个组件显示区域 -->
        <!-- 动画加载 -->
        <LoadingComponent v-show="isLoading"></LoadingComponent>
        <PdinfoComponent v-if="portComponents.pdinfo.toggle" @close="componentsHide" :params="portComponents.pdinfo.params"></PdinfoComponent>
        <PdtgComponent v-if="portComponents.pdtg.toggle" @close="componentsHide" :params="portComponents.pdtg.params"></PdtgComponent>
        <PdbtgComponent v-if="portComponents.pdbtg.toggle" @close="componentsHide" :params="portComponents.pdbtg.params"></PdbtgComponent>
        <WpxqComponent v-if="portComponents.wpxq.toggle" @close="componentsHide" :params="portComponents.wpxq.params"></WpxqComponent>
        <router-view class="port-view"></router-view>
  </el-tab-pane>
</el-tabs>
		
	</div>
</template>
<script>
	import { mapState } from 'vuex'
	import LoadingComponent from 'components/loading'
	import CgrkbtgComponent from './cgrkbtg'
    import CgrktgComponent from './cgrktg'
    import WpxqComponent from 'view/manage/kccx/wpxq'
    import CgrkinfoComponent from './cgrkinfo'
    import CgthinfoComponent from './cgthinfo'
    import BsinfoComponent from './bsinfo'
    import PdinfoComponent from './Pdinfo'
    import CgthbtgComponent from './cgthbtg'
    import CgthtgComponent from './cgthtg'
	import BsbtgComponent from './bsbtg'
    import BstgComponent from './bstg'
    import PdbtgComponent from './pdbtg'
    import PdtgComponent from './pdtg'
	import qs from 'qs'
	export default {
		components: { LoadingComponent,
			CgrkbtgComponent,
			CgrktgComponent,
			CgthbtgComponent,
			CgthtgComponent,
			BsbtgComponent,
			BstgComponent,
			PdbtgComponent,
			WpxqComponent,
			PdinfoComponent,
			BsinfoComponent,
			CgthinfoComponent,
			CgrkinfoComponent,
			PdtgComponent,
		},
		data() {
			return {
				aa:false,
			    ss:true,
			    ss1:false,
				hd1:true,
				/*模糊搜索条件*/
                multipleDeleteDisabled:true,
				vkeyword: '', // 关键字报损原因
                vbtime:'',
                vetime:'',
                yc:true,
				multipleDelNum: '', //获取批量选择的数据
				cgrkdataList:[],//采购入库审核
				bsdataList: [], //报损审核
				cgthdataList:[], //采购退货审核
				pddataList: [], //盘点审核
				comboxlist: [], //下拉框 动态的
                visqy:'N',
				/*动画加载*/
				isLoading: true, //动画加载
				searchLoading: false, //搜索按钮触发按钮动画
				/*分页属性设置*/
				//采购入库
				layout: 'total, sizes, prev, pager, next, jumper', //组件布局
				pageindex1: this.$store.state.pageindex, //当前分页页码
				pagesizes1: this.$store.state.pagesizes, //显示个数的选择器选项
				pagesize1: this.$store.state.pagesize, //每页显示条目数
				total1: 0, //总条数
				
				//采购退货
				layout: 'total, sizes, prev, pager, next, jumper',//组件布局
                pageindex2: this.$store.state.pageindex,//当前分页页码
                pagesizes2: this.$store.state.pagesizes,//显示个数的选择器选项
                pagesize2: this.$store.state.pagesize,//每页显示条目数
                total2: 0,//总条数

                //报损
                layout: 'total, sizes, prev, pager, next, jumper',//组件布局
                pageindex3: this.$store.state.pageindex,//当前分页页码
                pagesizes3: this.$store.state.pagesizes,//显示个数的选择器选项
                pagesize3: this.$store.state.pagesize,//每页显示条目数
                total3: 0,//总条数

                //盘点
                layout: 'total, sizes, prev, pager, next, jumper',//组件布局
                pageindex4: this.$store.state.pageindex,//当前分页页码
                pagesizes4: this.$store.state.pagesizes,//显示个数的选择器选项
                pagesize4: this.$store.state.pagesize,//每页显示条目数
                total4: 0,//总条数


				/*组件区域*/
				portComponents: {
					/* 单行删除  */
					singleDelete: {
						type: 'singleDelete',
						toggle: false,
						params: '',
						data: {
							index: '',
							type: 'single',
							title: '此操作将删除该记录?, 是否继续?'
						}
					},
					/* 批量删除 */
					multipleDelete: {
						type: 'multipleDelete',
						toggle: false,
						params: '',
						data: {
							index: '',
							type: 'multiple',
							title: '此操作将删除您选中的记录?, 是否继续?'
						}
					},
					/* 添加 */
					add: {
						type: 'add',
						toggle: false,
						params: '',
						data: {}
					},
					/* 编辑 */
					edit: {
						type: 'edit',
						toggle: false,
						params: '',
						data: {}
					},
					/* info */
					info: {
						type: 'info',
						toggle: false,
						params: '',
						data: {}
					},
					wpxq: {
						type: 'wpxq',
						toggle: false,
						params: '',
						data: {}
					},
					//采购入库
					cgrkbtg: {
                        type: 'cgrkbtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    cgrktg: {
                        type: 'cgrktg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    cgrkinfo: {
						type: 'cgrkinfo',
						toggle: false,
						params: '',
						data: {}
					},
                    //报损
                    bsbtg: {
                        type: 'bsbtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    bstg: {
                        type: 'bstg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    bsinfo: {
                        type: 'bsinfo',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    //采购退货
                    cgthbtg: {
                        type: 'cgthbtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    cgthtg: {
                        type: 'cgthtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    cgthinfo: {
                        type: 'cgthinfo',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    //盘点
                    pdbtg: {
                        type: 'pdbtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    pdtg: {
                        type: 'pdtg',
                        toggle: false,
                        params: '',
                        data: {}
                    },
                    pdinfo: {
                        type: 'pdinfo',
                        toggle: false,
                        params: '',
                        data: {}
                    }
				},
				/*
				    prop :  接口参数名
				    label : 接口中文名
				    hide : 是否隐藏这一列
				    align : 这一列对齐顺序 ： left,right,center
				    headerAlign : 这一列表头对齐方式 ： left,right,center
				*/
				//采购入库审核
				cgrkportTitleList: [
                    {
                        prop:'id',
                        label:'入库明细id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'xxid',
                        label:'学校id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'xxmc',
                        label:'学校名称',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpid',
                        label:'物品id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpmc',
                        label:'物品名称',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpflid',
                        label:'物品分类id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpflmc',
                        label:'分类名称',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                      prop:'sl',
                      label:'入库数量',
                      hide:1,
                      align:'center',
                      fixed:false,
                      width:'70',
                      minWidth:'',
                      headerAlign:'center',
                      formatter: function(row,column) {}
                    },
                     {
                        prop:'jg1',
                        label:'入库单价/单位',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'100',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'jg2',
                        label:'物品总价',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                     {
                        prop:'dw',
                        label:'单位',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                     {
                        prop:'rksj',
                        label:'入库时间',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'85',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },

                    {
                        prop:'shrmc',
                        label:'审核人',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'ztmc',
                        label:'状态',
                        // 0（待审核）1审核通过2审核不通过
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'zt',
                        label:'状态',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'rkrmc',
                        label:'入库人',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'rkr',
                        label:'入库人id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'shr',
                        label:'审核人id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'shsj',
                        label:'审核时间',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'ms',
                        label:'入库说明',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'button',
                        label:'',
//                      (修改删除通过未通过详情)
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                     {
                        prop:'kk',
                        label:'',
//                      (是否显示批量)
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                ],
                
                //采购退货审核
                cgthportTitleList: [

                    {
                        prop:'id',
                        label:'',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpmc',
                        label:'物品名称',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'flmc',
                        label:'分类名称',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                     {
                        prop:'ckmc',
                        label:'仓库名称',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpdj',
                        label:'物品单价',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'kcsl',
                        label:'库存数量',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'sl',
                        label:'退货数量',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'thje',
                        label:'退货金额',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'sj',
                        label:'退货时间',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'85',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'ztmc',
                        label:'审核状态',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'70',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'thyy',
                        label:'退货原因',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'jsrmc',
                        label:'退货审核人',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    
                    {
                        prop:'shrmc',
                        label:'审核人员',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'shsj',
                        label:'审核时间',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                ],
                
				    //报损审核
				bsportTitleList: [
					{
						prop: 'id',
						label: '',
						hide: 0,
						align: 'center',
						fixed: false,
						width: '',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'xxid',
						label: '学校id',
						hide: 0,
						align: 'center',
						fixed: false,
						width: '',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'wpid',
						label: '物品id',
						hide: 0,
						align: 'center',
						fixed: false,
						width: '',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'wpmc',
						label: '物品名称',
						hide: 0,
						align: 'center',
						fixed: false,
						width: '70',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'flmc',
						label: '分类名称',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '70',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'sl',
						label: '报损数量',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '70',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'bsrmc',
						label: '报损人员',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '70',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'jsrmc',
						label: '报损审核人',
						hide: 0,
						align: 'center',
						fixed: false,
						width: '120',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'sj',
						label: '报损时间',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '120',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'ztmc',
						label: '审核状态',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '70',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},
					{
						prop: 'bsyy',
						label: '报损原因',
						hide: 1,
						align: 'center',
						fixed: false,
						width: '',
						minWidth: '',
						headerAlign: 'center',
						formatter: function(row, column) {}
					},

				],
				
				pdportTitleList: [

                    {
                        prop:'xxid',
                        label:'学校id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'id',
                        label:'盘点表id',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'pdemp',
                        label:'盘点人员',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'100',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'pdtime',
                        label:'盘点时间',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'100',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'flmc',
                        label:'物品分类',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'wpmc',
                        label:'物品名称',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'tgtcnt',
                        label:'账面库存数量',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'pdcnt',
                        label:'实际有效数量',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'bxcnt',
                        label:'报修数量',
                        hide:0,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'bscnt',
                        label:'报损数量',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },
                    {
                        prop:'ztmc',
                        label:'状态',
                        hide:1,
                        align:'center',
                        fixed:false,
                        width:'',
                        minWidth:'',
                        headerAlign:'center',
                        formatter: function(row,column) {}
                    },

                ]
			}
		},
		created() {
			//权限
        	var logininfo = JSON.parse(localStorage.logininfo) ;
            this.$store.dispatch('changeTitle','库存审核');//修改title
			this.$store.dispatch('changeRouterIndex', '/cost/kcsh'); //修改路由
			this.search(); //分页获取默认数据
			this.isLoading = true; //动画开始
			this.hdxx();
		},
		mounted() {
			//加载完成之后event
			this.isLoading = false; //动画结束
		},
		methods: {
			gd(){
        		this.aa=true;
        		this.ss=false;
        		this.ss1=true;
        	},
        	gd1(){
        		this.aa=false;
        		this.ss=true;
        		this.ss1=false;
        	},
			hdxx(){
				this.$store.state.loading = true;
      				//装载数据
      				var logininfo = JSON.parse(localStorage.logininfo);
      				var params2 = qs.stringify({
      						yhid: logininfo.id,
      						xxid: logininfo.xxid
      					})
      				//执行
      				    this.axios.post(this.$store.state.api + 'wpbs/hdxt',  params2 )
      						.then(res => {
      							console.log(res,'wwwwwwwwwwww')
      							if(res.data.code == 1) {
      								this.$store.state.loading = false;
      							} else {
      							this.$message.warning(res.data.msg);
      							this.$store.state.loading = false;
      							}
      						}).catch(res => {
      							this.$message.warning("服务器异常");
      							this.$store.state.loading = false;
      						})
				
			},
		
			//采购入库批量审核
			plsh() {
          	
            this.$confirm('此操作将审核所选全部物品, 是否继续?', '提示', {
    				 confirmButtonText: '确定',
    				 cancelButtonText: '取消',
    				 type: 'warning'
    			 }).then(() => {
             var arr = this.multipleDelNum
      				this.$store.state.loading = true;
      				//装载数据
      				var logininfo = JSON.parse(localStorage.logininfo);
      				var params2 = qs.stringify({
      						ids:arr+'',
      						zt:1+'',
        					btgyy: ''+'',
      						yhid: logininfo.id+'',
      						xxid: logininfo.xxid+''
      					})
      				//执行
      				    this.axios.post(this.$store.state.api + 'wprkdmx/check',  params2 )
      						.then(res => {
      							if(res.data.code == 1) {
                                     this.search();
                                     this.multipleDeleteDisabled = true
      								this.$store.state.loading = false;
      							} else {
      							this.$message.warning(res.data.msg);
      								this.$store.state.loading = false;
      							}
      						}).catch(res => {
      							this.$message.warning("服务器异常");
      							this.$store.state.loading = false;
      						})
    			 }).catch(() => {
    				 this.$message({ type: 'info',message: '已取消'});
    			 });
     			},
     		//采购退货批量审核
			cgthplsh() {
          	
            this.$confirm('此操作将审核所选全部物品, 是否继续?', '提示', {
    				 confirmButtonText: '确定',
    				 cancelButtonText: '取消',
    				 type: 'warning'
    			 }).then(() => {
             var arr = this.multipleDelNum
      				this.$store.state.loading = true;
      				//装载数据
      				var logininfo = JSON.parse(localStorage.logininfo);
      				var params2 = qs.stringify({
      						ids:arr+'',
      						zt:1+'',
      						yhid: logininfo.id+'',
      						xxid: logininfo.xxid+''
      					})
      				//执行
      				    this.axios.post(this.$store.state.api + 'wpcgth/chk',  params2 )
      						.then(res => {
      							if(res.data.code == 1) {
                                     this.search();
                                     this.multipleDeleteDisabled = true
      								this.$store.state.loading = false;
      							} else {
      							this.$message.warning(res.data.msg);
      								this.$store.state.loading = false;
      							}
      						}).catch(res => {
      							this.$message.warning("服务器异常");
      							this.$store.state.loading = false;
      						})
    			 }).catch(() => {
    				 this.$message({ type: 'info',message: '已取消'});
    			 });
     			},
     			//报损批量审核
			bsplsh() {
            this.$confirm('此操作将审核所选全部物品, 是否继续?', '提示', {
    				 confirmButtonText: '确定',
    				 cancelButtonText: '取消',
    				 type: 'warning'
    			 }).then(() => {
             var arr = this.multipleDelNum
      				this.$store.state.loading = true;
      				//装载数据
      				var logininfo = JSON.parse(localStorage.logininfo);
      				var params2 = qs.stringify({
      						ids:arr+'',
      						zt:1+'',
      						yhid: logininfo.id+'',
      						xxid: logininfo.xxid+''
      					})
      				//执行
      				    this.axios.post(this.$store.state.api + 'wpbs/bschk',  params2 )
      						.then(res => {
      							if(res.data.code == 1) {
                                     this.search();
                                     this.multipleDeleteDisabled = true
      								this.$store.state.loading = false;
      							} else {
      							this.$message.warning(res.data.msg);
      								this.$store.state.loading = false;
      							}
      						}).catch(res => {
      							this.$message.warning("服务器异常");
      							this.$store.state.loading = false;
      						})
    			 }).catch(() => {
    				 this.$message({ type: 'info',message: '已取消'});
    			 });
     			},
     			//盘点批量审核
			pdplsh() {
            this.$confirm('此操作将审核所选全部物品, 是否继续?', '提示', {
    				 confirmButtonText: '确定',
    				 cancelButtonText: '取消',
    				 type: 'warning'
    			 }).then(() => {
             var arr = this.multipleDelNum
      				this.$store.state.loading = true;
      				//装载数据
      				var logininfo = JSON.parse(localStorage.logininfo);
      				var params2 = qs.stringify({
      						ids:arr+'',
      						zt:1+'',
      						yhid: logininfo.id+'',
      						xxid: logininfo.xxid+''
      					})
      				//执行
      				    this.axios.post(this.$store.state.api + 'wppdmx/chk',  params2 )
      						.then(res => {
      							if(res.data.code == 1) {
                                     this.search();
                                     this.multipleDeleteDisabled = true
      								this.$store.state.loading = false;
      							} else {
      							this.$message.warning(res.data.msg);
      								this.$store.state.loading = false;
      							}
      						}).catch(res => {
      							this.$message.danger("服务器异常");
      							this.$store.state.loading = false;
      						})
    			 }).catch(() => {
    				 this.$message({ type: 'info',message: '已取消'});
    			 });
     			},
			search() {
				if(this.visqy=='Y'){
            	   	 this.yc=false;
            	   }else{
            	   	this.yc=true;
            	   }
				//查询搜索触发事件
	          var time1 = this.$.getLocalTimeNo0(Date.parse(this.vbtime));
	          var time2 = this.$.getLocalTimeNo0(Date.parse(this.vetime));
	        //采购入库
            var logininfo = JSON.parse(localStorage.logininfo) ;
              this.searchLoading = true;
              var params3 = qs.stringify({
                yhid:logininfo.id,
                xxid:logininfo.xxid,
                pageindex: this.pageindex1,
                pagesize: this.pagesize1,
                keyword :this.vkeyword,
                wpfl:this.wpfl,
                zt1:this.visqy,
                btime:time1,
                etime:time2
      				});
              this.axios.post(this.$store.state.api + 'wprkdmx/list',params3 )
              .then( res => {
                  let data = res.data.data;
                  let list = data.list;
                  this.total1 = data.totalPage;
                  this.cgrkdataList = list;
                  this.searchLoading = false;
              }).catch( res => {
                  console.log(res)
                  this.searchLoading = false;
              })
              //采购退货
               var params3 = qs.stringify({
              zt:this.visqy,
              keyword: this.vkeyword, // 关键字
              btime: time1,
              etime: time2,
              yhid:logininfo.id,
              xxid:logininfo.xxid,
              wpfl:this.wpfl,
              pageindex: this.pageindex2,
              pagesize: this.pagesize2
						});
              this.searchLoading = true;
              this.axios.post(this.$store.state.api + 'wpcgth/list',params3)
              .then( res => {
              	console.log(res,'kkk')
                  let data = res.data.data;
                  let list = data.list;
                  this.total2 = data.totalPage;
                  this.cgthdataList = list;
                  this.searchLoading = false;
              }).catch( res => {
                  console.log(res)
                  this.searchLoading = false;
              })
              
              //报损审核
				var params3 = qs.stringify({
					keyword: this.vkeyword, // 关键字报损原因
					yhid: logininfo.id,
					xxid: logininfo.xxid,
					btime:time1,
					etime:time2,
					wpfl:this.wpfl,
					zt:this.visqy,
					pageindex: this.pageindex3,
					pagesize: this.pagesize3
				});
				this.axios.post(this.$store.state.api + 'wpbs/list',params3)
				.then(res => {
					let data = res.data.data;
					let list = data.list;
					this.total3 = data.totalPage;
					this.bsdataList = list;
					this.searchLoading = false;
				}).catch(res => {
					this.searchLoading = false;
				})
				
				//盘点审核
				var params3 = qs.stringify({
                      keyword: this.vkeyword, // keyword
                      btime: time1, // 开始时间
                      etime: time2, // 结束时间
                      yhid:logininfo.id,
                      wpfl:this.wpfl,
                      zt:this.visqy,
                      xxid:logininfo.xxid,
                      pageindex: this.pageindex4,
                      pagesize: this.pagesize4
                  });
                   this.axios.post(this.$store.state.api + 'wppdmx/list',params3)
              .then( res => {
                  let data = res.data.data;
                  let list = data.list;
                  this.total4 = data.totalPage;
                  this.pddataList = list;
                  this.searchLoading = false;
              }).catch( res => {
                  this.searchLoading = false;
              })
			},
			tableCellControl(scope) {
				//表格单元格控制CSS样式
				/*if (scope.row.id == 112 && scope.column.property == "iname") {
				    return {
				        color:"red",
				    }
				}else{
				    return {
				        color:"green",
				    }
				}*/
			},
			//采购入库
			cgrkhandleSizeChange(val) { //每页显示条数触发事件
				this.pagesize1 = val;
				this.pageindex1 = 1;
				this.search();
			},
			cgrkhandleCurrentChange(val) { //分页触发事件
				this.search();
			},
			cgthhandleSizeChange(val) { //每页显示条数触发事件
				this.pagesize2 = val;
				this.pageindex2 = 1;
				this.search();
			},
			cgthhandleCurrentChange(val) { //分页触发事件
				this.search();
			},
			bshandleSizeChange(val) { //每页显示条数触发事件
				this.pagesize3 = val;
				this.pageindex3 = 1;
				this.search();
			},
			bshandleCurrentChange(val) { //分页触发事件
				this.search();
			},
			pdhandleSizeChange(val) { //每页显示条数触发事件
				this.pagesize4 = val;
				this.pageindex4 = 1;
				this.search();
			},
			pdhandleCurrentChange(val) { //分页触发事件
				this.search();
			},
			checkSelect (selection, row) {//点击单选select触发事件
                console.log(selection, row)
                let strID = [];
                selection.forEach(function(v,i){
                    strID.push(v.id)
                })
                this.multipleDelNum = strID.join(",");
                if(this.multipleDelNum){
                	this.multipleDeleteDisabled = false
                }else{
                	this.multipleDeleteDisabled = true
                }
            },
            checkall (selection) {//点击全选select触发事件
                let strID = [];
                selection.forEach(function(v,i){
                    strID.push(v.id)
                })
                this.multipleDelNum = strID.join(",");
                if(this.multipleDelNum){
                	this.multipleDeleteDisabled = false
                }else{
                	this.multipleDeleteDisabled = true
                }
            },
			/* 组件的弹框  */
			componentsShow(type, data) { //显示组件
				for(let i in this.portComponents) {
					if(type == this.portComponents[i].type) {
						this.portComponents[i].toggle = true;
						this.portComponents[i].params = data;
						if(this.portComponents[i].data.type == 'single') {
							this.portComponents[i].data.index = data.row.id
						} else if(this.portComponents[i].data.type == 'multiple') {
							this.portComponents[i].data.index = this.multipleDelNum;
						} else {
							return;
						}
						return;
					}
				}
			},
			componentsHide(setting) { //关闭组件
				this.multipleDeleteDisabled = true
				for(let i in this.portComponents) {
					if(setting.type == this.portComponents[i].type) {
						this.portComponents[i].toggle = false;
						if(!setting.cancel) {
							this.search();
						}
						return;
					}
				}
			}
		},
		computed: {
			...mapState([
				'api' //域名
			]),
//			multipleDeleteDisabled() {
//				// console.log(this.multipleDelNum)
//				if(this.multipleDelNum) {
//					return false;
//				} else {
//					return true
//				}
//			}
		}
	}
</script>

<style lang="less" scoped>
	.port-page {
		font-size: 12px;
		.btn {
			height: 30px;
			padding: 0 10px;
		}
		.code-search {
			max-width: 130px;
            min-width: 100px;
            text-align: center;
            height: 50px;
            /*line-height: 50px;*/
            font-size: 12px;
		}
		.class-page {
			text-align: left;
			margin-top: 10px;
		}
		.search-item {
			display: inline-block;
		}
		 .but1{
		 	width: 23%;
			height: 50px;
			float: left;
			line-height: 50px;
		}
		.but2{
			width: 100%;
			/*float: left;*/
			margin-top: 10px;
			margin-bottom: 8px;
		}
		.search{
			width: 77%;
			height: 50px;
			line-height: 50px;
			float: right;
			text-align: right;
		}
		.search1{
			width: 50%;
			height: 50px;
			float: right;
			line-height: 50px;
			margin-right: 37px;
			text-align: right;
		}
		.el-button+.el-button {
            margin-left: 0px;
            margin-top: 8px;
        }
	}
</style>
